#ifndef LOGPTR_H
#define LOGPTR_H

#include <memory>

#include "Log.h"

class LogPtr
{

public:	
	Log * operator->()const;
	virtual ~LogPtr();

private:	
//	static Log * log;
	static std::auto_ptr<Log> sm_inst;
};

#ifdef _DEBUG_LOG
#	define STR_MSG(s) LogPtr()->message((s), __FILE__, __LINE__)
#	define STR_ERR(s) LogPtr()->error((s),__FILE__, __LINE__)
#	define STR_WARN(s) LogPtr()->warning((s), __FILE__, __LINE__)
#else
#	define STR_MSG(s)
#	define STR_ERR(s)
#	define STR_WARN(s)
#endif

#endif //LOGPTR_H